Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Fix Jira API request only returning 50 tickets#34

Open
berni2288 wants to merge 1 commit intocoreos:masterfrom
berni2288:fix-toomanyticketsforapirequest
Open

Fix Jira API request only returning 50 tickets#34
berni2288 wants to merge 1 commit intocoreos:masterfrom
berni2288:fix-toomanyticketsforapirequest

Conversation

@berni2288
Copy link
Copy Markdown
Contributor

Based on Ticket #30
One API request per ticket is done now.

Copy link
Copy Markdown
Contributor

@squat squat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long delay here. This patch needs one small change (and one performance improvement) and then it’s good to go.

Comment thread lib/issues.go
@@ -37,15 +37,18 @@ func CompareIssues(config cfg.Config, ghClient clients.GitHubClient, jiraClient
ids[i] = v.GetID()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due do this patch, this slice is never used. We should eliminate this loop and then this PR is good.

Comment thread lib/issues.go
for _, ghIssue := range ghIssues {
found := false

ids := make([]int, 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could same some time by allocating this slice only once, before the loop, and then reusing it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants